package jtk.project4.fleet.screen.labor;


import java.awt.FlowLayout;

import nl.coderight.jazz.form.FormView;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.button.PushButton;
import jtk.project4.fleet.field.*;

	public class LaborView extends FormView{

		private PushButton saveButton;
		private PushButton cancelButton;
		public LaborView(){
			setTitle("JTK Fleet");
			setSize(620, 460);
			center();
		}

		@Override
		protected void init() {
			// TODO Auto-generated method stub
			createFields();
			createLayout();
			
		}
		
		private void createFields(){
			saveButton = new PushButton("Save");
			cancelButton = new PushButton("Cancel");
		}
		
		private void createLayout() {
			addField(new LaborDetailsnewField(""));
			addField(createButtons(),SOUTH);
		}
		private GroupControl createButtons() {
			GroupControl buttons = new GroupControl();
			buttons.setLayout(new FlowLayout(FlowLayout.RIGHT));
			buttons.addField(saveButton);
			buttons.addField(cancelButton);
			return buttons;
		}
		

}
